import React from 'react';
import { Icon } from 'antd'; 

export default class Loading extends React.Component {
  
  render() {
    const { loading, content } = this.props;

    return (
      <React.Fragment ecId={`${this && this.props && this.props.ecId || ''}_undefined@4xt98e`}>
        { loading ?
          <div style={{ padding: 10, textAlign: 'center' }} className='wea-edc-share-loading'>
            <Icon ecId={`${this && this.props && this.props.ecId || ''}_Icon@fjc80y`} type="loading" />
            {
              content ?
              <div style={{ paddingTop: 10, color: '#aaa' }}>{content}</div> : null
            }
          </div> : null
        }
      </React.Fragment>
    )
  }
}